package com.myspring.lab.dao;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DbConnnect {
    private static SessionFactory sessionFactory;

    public static SessionFactory getSessionFactory() {
        return sessionFactory;
    }

    public  DbConnnect(){
        Configuration configuration = new Configuration();
        configuration.configure("hibernate.cfg.xml");
        sessionFactory = configuration.buildSessionFactory();
    }
}
